<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
			<div class="widget-head">
				<div class="widget-title ">物流公司列表</div>
			</div>
			<div class="widget-body layui-col-sm12 layui-col-md12 layui-col-lg12">
				<div class="layui-col-sm12 layui-col-md6 layui-col-lg6">
					<div class="layui-form-item">
							<div class="">
								<a class="layui-btn"
								   href="{:url('setting/addexpress')}">
									<span class="mdi menu-icon mdi-plus"></span> 新增
								</a>
							</div>
					</div>
				</div>
			   <div class="layui-col-md12" >
					<table width="100%" class="layui-table">
						<thead>
						<tr>
							<th>物流公司ID</th>
							<th>物流公司名称</th>
							<th>物流公司代码</th>
							<th>排序</th>
							<th>添加时间</th>
							<th>操作</th>
						</tr>
						</thead>
						<tbody>
					   {notempty name="$list"}
						   {foreach $list as $item}
								<tr>
									<td class="layer-text-middle">{$item['express_id']}</td>
									<td class="layer-text-middle">{$item['express_name']}</td>
									<td class="layer-text-middle">{$item['express_code']}</td>
									<td class="layer-text-middle">{$item['sort']}</td>
									<td class="layer-text-middle">{$item['create_time']|date="Y-m-d h:i"}</td>
									<td class="layer-text-middle">
										<div class="tpl-table-black-operation">
											<a href="{:url('setting/addexpress',
												['express_id' => $item['express_id']])}">
												<i class="mdi menu-icon mdi-pencil"></i> 编辑
											</a>
											<a href="javascript:;" class="item-delete tpl-table-black-operation-del"
											   data-id="{$item['express_id']}">
												<i class="mdi menu-icon mdi-delete-forever"></i> 删除
											</a>
										</div>
									</td>
								</tr>
							{/foreach}
						{else /}
							<tr>
								<td colspan="12" class="layer-text-center">暂无记录</td>
							</tr>
						{/notempty}
						</tbody>
					</table>
				</div>
				<div class="layui-col-lg12 ">
					<div class="layer-fr">{$list|raw}</div>
					<div class="layer-fr pagination-total layer-margin-right">
						<div class="layer-vertical-align-middle">总记录：{$list->total()}</div>
					</div>
				</div>
			</div>
        </div>
    </div>
</div>
<script>
    $(function () {

        // 删除元素
               var url = "{:url('setting/delete')}";
        $('.item-delete').delete('id', url,'','Express');

    });
</script>

